home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 May
/
CMCD0505.ISO
/
Software
/
Demo
/
DesktopX
/
objects
/
ktekdockv1.dxpack
/
{CFD94BD6-8636-403E-9E5F-CD4C668E59CC}.DXScript2
< prev
next >
Wrap
Extensible Markup Language
|
2004-08-24
|
3KB
|
76 lines
<?xml version="1.0"?>
<!--DXScript Data File. Version 2.0-->
<DXScript>
<Script><![CDATA[Dim mynum
Dim tuning
Dim url
Dim station
'Called when the script is executed
Sub Object_OnScriptEnter
mynum=right(object.Name,len(object.Name)-12)'12
End Sub
Function Object_OnLButtonDown(x, y)
DesktopX.Object("shortcutcaption"&mynum).move DesktopX.Object("shortcutcaption"&mynum).left+1,7
tuning=False
object.SetTimer 1000,2000
End Function
Function Object_OnLButtonUp(x, y, Dragged)
DesktopX.Object("shortcutcaption"&mynum).move DesktopX.Object("shortcutcaption"&mynum).left-1,6
object.KillTimer 1000
If tuning=False And Dragged=False Then
desktopx.ScriptObject("kbarpin").launchshortcut(mynum)
End If
End Function
Sub Object_OnTimer1000'sub called if button held for 2 seconds
object.KillTimer 1000
tuning=True
m=msgbox("Program/document shortcut or URL?"&Chr(13)&"Press YES for program/document or NO for URL",vbYesNo + vbQuestion,"K-Dock")
If m=vbYes Then
oldpath=object.LocalStorage("p")
If oldpath="" Then oldpath="C:\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
newpath = System.FileOpenDialog("Select file...", "", oldpath , "Program files|*.exe|All files|*.*", 0)
If newpath="" Then
Exit Sub
End If
Set objFile=objFSO.GetFile(newpath)
n=objFile.Name
Else
newpath=InputBox("Enter the URL","K-Dock")
If newpath="" Then
Exit Sub
End If
n1=instr(newpath,"www.")
If n1>0 Then
n1=n1+4
n=mid(newpath,n1,n1+20)
Else
n="my url"
End If
End If
Do
newcaption=InputBox("Enter the caption for your shortcut"&Chr(13)&"(20 characters or less)","K-Dock",n)
Loop Until Len(newcaption)<=20
If newcaption="" Then
Exit Sub
End If
desktopx.ScriptObject("kbarpin").redefineshortcut mynum,newpath,newcaption
End Sub
Sub Object_OnMouseEnter
'station=desktopx.Object("kradiostation"&mynum).text
'DesktopX.ScriptObject("kradiotip").tooltip(station)
End Sub
Sub Object_OnMouseLeave
'DesktopX.ScriptObject("kradiotip").tooltip("hide")
End Sub
'Called when the script is terminated
Sub Object_OnScriptExit
End Sub
]]></Script><Globals><Editor><PropPane>0</PropPane><EditorLeft>222</EditorLeft><EditorTop>7</EditorTop><EditorRight>1230</EditorRight><EditorBottom>881</EditorBottom></Editor><Object><LanguageCLSID>{B54F3741-5B07-11CF-A4B0-00AA004A55E8}</LanguageCLSID><ControlCLSID>{00000000-0000-0000-0000-000000000000}</ControlCLSID><ControlObjWidth>64</ControlObjWidth><ControlObjHeight>64</ControlObjHeight><RunState>1</RunState><ManualControlLoad>0</ManualControlLoad><ScriptHostVersion>2</ScriptHostVersion></Object></Globals></DXScript>